package com.parkreport.report.action;

import javax.xml.rpc.ServiceException;

import com.common.report.vo.ReportTableViewVO;
import com.parkreport.base.BaseAction;
import com.parkreport.report.service.LeaveCarReportService;
import com.parkreport.report.service.LeavePersonReportService;
import com.parkreport.vo.ReportParamVO;

public class LeaveReportAction extends BaseAction {

	private LeaveCarReportService carService = new LeaveCarReportService();
	private LeavePersonReportService personService = new LeavePersonReportService();
	
	private ReportParamVO paramVO = new ReportParamVO();
	
	private ReportTableViewVO tableVO = new ReportTableViewVO();
	
	private String searchTitles;
	private String searchMents;
	private String startDate;
	private String endDate;
	
	
	public String personCount(){
		
		try {
			tableVO = personService.getTableViewVO(this.getRequest());
			tableVO.setMentName("来源区域");
			tableVO.setReportName("滞留游客数统计");
			this.getSession().setAttribute("tableVO", tableVO);
		} catch (ServiceException e) {
			log.error(e.getMessage(),e);
		}
		
		return topager("/pages/report/leave/person_list.jsp");
	}
	
	public String carCount(){
		
		try {
			tableVO = carService.getTableViewVO(this.getRequest());
			tableVO.setMentName("来源区域");
			tableVO.setReportName("滞留游客车辆数统计");
			this.getSession().setAttribute("tableVO", tableVO);
		} catch (ServiceException e) {
			log.error(e.getMessage(),e);
		}
		
		return topager("/pages/report/leave/car_list.jsp");
	}
	
	
	
	//setter getter 
	public ReportParamVO getParamVO() {
		return paramVO;
	}

	public void setParamVO(ReportParamVO paramVO) {
		this.paramVO = paramVO;
	}



	public ReportTableViewVO getTableVO() {
		return tableVO;
	}

	public void setTableVO(ReportTableViewVO tableVO) {
		this.tableVO = tableVO;
	}
	public String getEndDate() {
		return endDate;
	}
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	public String getStartDate() {
		return startDate;
	}
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}
	public String getSearchMents() {
		return searchMents;
	}
	public void setSearchMents(String searchMents) {
		this.searchMents = searchMents;
	}
	public String getSearchTitles() {
		return searchTitles;
	}
	public void setSearchTitles(String searchTitles) {
		this.searchTitles = searchTitles;
	}
}
